package abstractfactory;

import abstractfactory.animal.Animal;
import abstractfactory.fruit.AppleFactory;
import abstractfactory.fruit.Fruit;
import abstractfactory.fruit.GrapeFactory;
import abstractfactory.fruit.OrangeFactory;

/**
 * @Author Fish Paradise
 * @Description
 * @Date 2019/1/16  19:27
 **/
public class Test {

    public static void main(String[] args) {
        BothFacotry bothFacotry = new AFactory();
        bothFacotry.createAnimalFactory().createAnimal().sayName();
        bothFacotry.createFruitFactory().createFruit().sayName();
        BothFacotry bothFacotry1 = new BFactory();
        bothFacotry1.createAnimalFactory().createAnimal().sayName();
        bothFacotry1.createFruitFactory().createFruit().sayName();
    }
}
